const render = require("../../lib/bottom_nav");
require("../../assets/css/index.less")
require("../../assets/css/common.less");
require("./run.less")
const rendermytop = require("../../lib/mytop")
rendermytop("run")
render("run");


function $(select){
    return document.querySelector(select)
}

window.onload = ()=>{
    var map = new AMap.Map('container', {
        zoom:15,//级别
        center: [104.050504,30.493657],//中心点坐标
        viewMode:'3D'//使用3D视图
    });

    //缩放按钮插件
    AMap.plugin('AMap.ToolBar',function(){//异步加载插件
        var toolbar = new AMap.ToolBar();
        map.addControl(toolbar);
    });

    $(".go").addEventListener("click",function(){
        $(".mask2").style.display = "block"
        let index = 3
        let timer = setInterval(daojishi,1000);
        function daojishi(){
              if(index>0){
                $(".time").textContent = index;
              }else if(index===0){
                $(".time").textContent = "GO";
              }else{
                clearInterval(timer);
                 location.href = "./home.html"
              }
             index--;
            
        }
        daojishi();
    })
}